package org.zhuyx.ch02.shili.entity;

import org.zhuyx.ch02.shili.entity.Pet;

import java.io.Serializable;
import java.util.*;

/**
 * @author 茜茜
 * @date 2024-12-05 15:47
 */
public class TypeEntity implements Serializable {
    private  String expression;
    private String code;
    private Pet refPet;
    private Pet innerPet;
    private String[] array;
    private List<String> list;
    private Set<String> set;
    private Map<String,String> map;
    private Properties properties;
    private String emptyValue;
    private String nullValue="初识有值，需设置为null";

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Pet getRefPet() {
        return refPet;
    }

    public void setRefPet(Pet refPet) {
        this.refPet = refPet;
    }

    public Pet getInnerPet() {
        return innerPet;
    }

    public void setInnerPet(Pet innerPet) {
        this.innerPet = innerPet;
    }

    public String[] getArray() {
        return array;
    }

    public void setArray(String[] array) {
        this.array = array;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public Set<String> getSet() {
        return set;
    }

    public void setSet(Set<String> set) {
        this.set = set;
    }

    public Map<String, String> getMap() {
        return map;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public String getEmptyValue() {
        return emptyValue;
    }

    public void setEmptyValue(String emptyValue) {
        this.emptyValue = emptyValue;
    }

    public String getNullValue() {
        return nullValue;
    }

    public void setNullValue(String nullValue) {
        this.nullValue = nullValue;
    }

    @Override
    public String   toString() {
        if(refPet!=null) {
            refPet.introduce();
        }
        if(innerPet!=null) {
            innerPet.introduce();
        }
        return "TypeEntity{" +
                "expression='" + expression + '\'' +
                ", code='" + code + '\'' +
                ", array=" + Arrays.toString(array) +
                ", list=" + list +
                ", set=" + set +
                ", map=" + map +
                ", properties=" + properties +
                ", emptyValue='" + emptyValue + '\'' +
                ", nullValue='" + nullValue + '\'' +
                '}';
    }
}
